<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<!DOCTYPE html>
<html lang="en">
<body>
<head>
<base href="<%=basePath%>">
<script type="text/javascript" src="static/js/jquery-1.7.2.js"></script>
<!--引入弹窗组件start-->
<script type="text/javascript" src="plugins/attention/zDialog/zDrag.js"></script>
<script type="text/javascript" src="plugins/attention/zDialog/zDialog.js"></script>
<!--引入弹窗组件end-->
<script type="text/javascript" src="static/js/jquery.tips.js"></script>
<!-- jsp文件头和头部 -->
<%-- <%@ include file="../../system/main/main_top.jsp"%> --%>
</head>
<p>商户平面图定位</p>

<img src="<%=basePath%>${organPageData.organ_plane_test}" border="0" usemap="#planetmap" alt="Planets" />

<map name="planetmap" id="planetmap">
	<c:choose>
	<c:when test="${not empty tableList}">
		<c:forEach items="${tableList}" var="table" varStatus="vs">
		<%-- ${table.shape}=${table.position}<p> --%>
			<area shape="${table.shape}" coords="${table.position}" href="javascript:void(0)" onclick="editTable('${table.id}','${table.position}','${table.table_name}','${table.organ_id}');" target="_parent" title="${table.table_name}" alt="${table.table_name}" />
		</c:forEach>
	</c:when>
	</c:choose>
</map>
<!-- 引入 -->
<script type="text/javascript">window.jQuery || document.write("<script src='static/js/jquery-1.9.1.min.js'>\x3C/script>");</script>
<script type="text/javascript" src="static/js/bootstrap.min.js"></script>
<script type="text/javascript" src="static/js/ace-elements.min.js"></script>
<script type="text/javascript" src="static/js/ace.min.js"></script>
<script type="text/javascript" src="static/js/chosen.jquery.min.js"></script><!-- 单选框 -->
<script type="text/javascript" src="static/js/bootstrap-datepicker.min.js"></script><!-- 日期框 -->
<script type="text/javascript" src="static/js/bootbox.min.js"></script><!-- 确认窗口 -->
<!-- 引入 -->

<script type="text/javascript">
$(top.hangge());
//修改
function editTable(table_id, position, table_name, organid){
	//window.parent.jzts();
	alert(position + " - " + table_name + " - " + organid);
	top.jzts();
	var diag = new top.Dialog();
	diag.Drag=true;
	diag.Title ="修改";
	diag.URL = '<%=basePath%>/commercial/table/goEditTable.do?tableid=' + table_id;
	diag.Width = 400;
	diag.Height = 580;
	diag.CancelEvent = function() { //关闭事件
		if (diag.innerFrame.contentWindow.document
				.getElementById('centerOfMainFrame').style.display == 'none') {
			top.jzts();
			//setTimeout("self.location.reload()", 100);
		}
		diag.close();
	};
	diag.show();
}
</script>
</body>
</html>
